﻿<navigation:Page x:Class="LEEAAttendanceControl.Views.SpecificExceptionsAssignments"
           xmlns:sdk="http://schemas.microsoft.com/winfx/2006/xaml/presentation/sdk"
           xmlns:toolkit="http://schemas.microsoft.com/winfx/2006/xaml/presentation/toolkit"
           xmlns:riaControls="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.DomainServices"
           xmlns:my="clr-namespace:LEEAAttendanceControl.Web.Services"
           xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
           xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
           xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
           xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
           mc:Ignorable="d"
           xmlns:navigation="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Navigation"
           d:DesignWidth="640" d:DesignHeight="480">
    <Grid x:Name="LayoutRoot">
        <ScrollViewer VerticalScrollBarVisibility="Auto">
            <StackPanel Orientation="Vertical" HorizontalAlignment="Left" Grid.Row="1" Margin="0,5,0,5">
                <Grid Background="#404041">
                    <TextBlock x:Name="ExAssignmentsBlock" Text="Exceptions Assignments" Foreground="White" FontSize="12"
                               FontWeight="Bold" Margin="5,3,3,2" HorizontalAlignment="Left"/>
                </Grid>

                <riaControls:DomainDataSource x:Name="ExceptionsDaysDataSource" QueryName="GetExceptionDays"
                                              AutoLoad="True" LoadingData="ExceptionsDaysDataSource_LoadingData">
                    <riaControls:DomainDataSource.DomainContext>
                        <my:LEEAContext />
                    </riaControls:DomainDataSource.DomainContext>
                </riaControls:DomainDataSource>

                <sdk:DataGrid x:Name="ExceptionsGrid" AutoGenerateColumns="False" IsReadOnly="True"
                                  VerticalScrollBarVisibility="Visible" MaxHeight="245"
                                  ItemsSource="{Binding Data, ElementName=ExceptionsDaysDataSource}">
                    <sdk:DataGrid.Columns>
                        <sdk:DataGridTemplateColumn Header="Exception Name" CanUserReorder="False"
                                                    CanUserResize="False" Width="290">
                            <sdk:DataGridTemplateColumn.CellTemplate>
                                <DataTemplate>
                                    <sdk:Label Content="{Binding ExceptionName}" Margin="5,2,2,2" Height="23"
                                               HorizontalAlignment="Left" VerticalAlignment="Center"/>
                                </DataTemplate>
                            </sdk:DataGridTemplateColumn.CellTemplate>
                        </sdk:DataGridTemplateColumn>
                        <sdk:DataGridTemplateColumn Header="From" CanUserReorder="False"
                                                    CanUserResize="False" Width="245">
                            <sdk:DataGridTemplateColumn.CellTemplate>
                                <DataTemplate>
                                    <sdk:Label Content="{Binding From, StringFormat='dd/MM/yyyy'}"
                                               Margin="5,2,2,2" HorizontalAlignment="Left" VerticalAlignment="Center"/>
                                </DataTemplate>
                            </sdk:DataGridTemplateColumn.CellTemplate>
                        </sdk:DataGridTemplateColumn>
                        <sdk:DataGridTemplateColumn Header="To" CanUserReorder="False" CanUserResize="False" Width="248">
                            <sdk:DataGridTemplateColumn.CellTemplate>
                                <DataTemplate>
                                    <sdk:Label Content="{Binding To, StringFormat='dd/MM/yyyy'}" Margin="5,2,2,2"
                                               HorizontalAlignment="Left" VerticalAlignment="Center"/>
                                </DataTemplate>
                            </sdk:DataGridTemplateColumn.CellTemplate>
                        </sdk:DataGridTemplateColumn>
                    </sdk:DataGrid.Columns>
                </sdk:DataGrid>
            </StackPanel>
        </ScrollViewer>
    </Grid>
</navigation:Page>
